gdk_wayland_display_get_xdg_shell
gdk_wayland_window_get_wl_surface
gdk_wayland_window_set_use_custom_surface
+gdk_wayland_window_get_wl_output
<SUBSECTION Standard>
GDK_TYPE_WAYLAND_DEVICE
const char *window_object_path,
const char *application_object_path,
const char *unique_bus_name);
+GDK_AVAILABLE_IN_3_22
+struct wl_output *gdk_wayland_window_get_wl_output (GdkWindow *window);
+
G_END_DECLS
return GDK_WINDOW_IMPL_WAYLAND (window->impl)->display_server.wl_surface;
}
+/**
+ * gdk_wayland_window_get_wl_output:
+ * @window: (type GdkWaylandWindow): a #GdkWindow
+ *
+ * Returns the Wayland output a #GdkWindow has last entered.
+ *
+ * Returns: (transfer none): a Wayland wl_output or NULL if the #GdkWindow
+ * is not associated with any Wayland wl_output.
+ *
+ * Since: 3.22
+ */
+struct wl_output *
+gdk_wayland_window_get_wl_output (GdkWindow *window)
+{
+ GdkWindowImplWayland *impl;
+
+ g_return_val_if_fail (GDK_IS_WAYLAND_WINDOW (window), NULL);
+
+ impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
+ /* We pick the head of the list as this is the last entered output */
+ if (impl->display_server.outputs)
+ return (struct wl_output *) impl->display_server.outputs->data;
+
+ return NULL;
+}
+
static struct wl_egl_window *
gdk_wayland_window_get_wl_egl_window (GdkWindow *window)
{